3.3.42 \(\int \frac {\cot ^5(e+f x)}{(a+b \tan ^2(e+f x))^3} \, dx\) [242]

3.3.42.1 Optimal result
3.3.42.2 Mathematica [A] (verified)
3.3.42.3 Rubi [A] (warning: unable to verify)
3.3.42.4 Maple [A] (verified)
3.3.42.5 Fricas [B] (verification not implemented)
3.3.42.6 Sympy [F(-1)]
3.3.42.7 Maxima [B] (verification not implemented)
3.3.42.8 Giac [B] (verification not implemented)
3.3.42.9 Mupad [B] (verification not implemented)

3.3.42.1 Optimal result

Integrand size = 23, antiderivative size = 210 \[ \int \frac {\cot ^5(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx=\frac {(a+3 b) \cot ^2(e+f x)}{2 a^4 f}-\frac {\cot ^4(e+f x)}{4 a^3 f}+\frac {\log (\cos (e+f x))}{(a-b)^3 f}+\frac {\left (a^2+3 a b+6 b^2\right ) \log (\tan (e+f x))}{a^5 f}+\frac {b^3 \left (10 a^2-15 a b+6 b^2\right ) \log \left (a+b \tan ^2(e+f x)\right )}{2 a^5 (a-b)^3 f}-\frac {b^3}{4 a^3 (a-b) f \left (a+b \tan ^2(e+f x)\right )^2}-\frac {(4 a-3 b) b^3}{2 a^4 (a-b)^2 f \left (a+b \tan ^2(e+f x)\right )} \]

output
1/2*(a+3*b)*cot(f*x+e)^2/a^4/f-1/4*cot(f*x+e)^4/a^3/f+ln(cos(f*x+e))/(a-b) 
^3/f+(a^2+3*a*b+6*b^2)*ln(tan(f*x+e))/a^5/f+1/2*b^3*(10*a^2-15*a*b+6*b^2)* 
ln(a+b*tan(f*x+e)^2)/a^5/(a-b)^3/f-1/4*b^3/a^3/(a-b)/f/(a+b*tan(f*x+e)^2)^ 
2-1/2*(4*a-3*b)*b^3/a^4/(a-b)^2/f/(a+b*tan(f*x+e)^2)
 
3.3.42.2 Mathematica [A] (verified)

Time = 2.72 (sec) , antiderivative size = 178, normalized size of antiderivative = 0.85 \[ \int \frac {\cot ^5(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx=\frac {\frac {(a+3 b) \cot ^2(e+f x)}{a^4}-\frac {\cot ^4(e+f x)}{2 a^3}+\frac {2 \log (\cos (e+f x))}{(a-b)^3}+\frac {4 \left (a^2+3 a b+6 b^2\right ) \log (\tan (e+f x))+\frac {b^3 \left (2 \left (10 a^2-15 a b+6 b^2\right ) \log \left (a+b \tan ^2(e+f x)\right )-\frac {a (a-b) \left (a (9 a-7 b)+2 (4 a-3 b) b \tan ^2(e+f x)\right )}{\left (a+b \tan ^2(e+f x)\right )^2}\right )}{(a-b)^3}}{2 a^5}}{2 f} \]

input
Integrate[Cot[e + f*x]^5/(a + b*Tan[e + f*x]^2)^3,x]
 
output
(((a + 3*b)*Cot[e + f*x]^2)/a^4 - Cot[e + f*x]^4/(2*a^3) + (2*Log[Cos[e + 
f*x]])/(a - b)^3 + (4*(a^2 + 3*a*b + 6*b^2)*Log[Tan[e + f*x]] + (b^3*(2*(1 
0*a^2 - 15*a*b + 6*b^2)*Log[a + b*Tan[e + f*x]^2] - (a*(a - b)*(a*(9*a - 7 
*b) + 2*(4*a - 3*b)*b*Tan[e + f*x]^2))/(a + b*Tan[e + f*x]^2)^2))/(a - b)^ 
3)/(2*a^5))/(2*f)
 
3.3.42.3 Rubi [A] (warning: unable to verify)

Time = 0.45 (sec) , antiderivative size = 193, normalized size of antiderivative = 0.92, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {3042, 4153, 354, 99, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\cot ^5(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {1}{\tan (e+f x)^5 \left (a+b \tan (e+f x)^2\right )^3}dx\)

\(\Big \downarrow \) 4153

\(\displaystyle \frac {\int \frac {\cot ^5(e+f x)}{\left (\tan ^2(e+f x)+1\right ) \left (b \tan ^2(e+f x)+a\right )^3}d\tan (e+f x)}{f}\)

\(\Big \downarrow \) 354

\(\displaystyle \frac {\int \frac {\cot ^3(e+f x)}{\left (\tan ^2(e+f x)+1\right ) \left (b \tan ^2(e+f x)+a\right )^3}d\tan ^2(e+f x)}{2 f}\)

\(\Big \downarrow \) 99

\(\displaystyle \frac {\int \left (\frac {\left (10 a^2-15 b a+6 b^2\right ) b^4}{a^5 (a-b)^3 \left (b \tan ^2(e+f x)+a\right )}+\frac {(4 a-3 b) b^4}{a^4 (a-b)^2 \left (b \tan ^2(e+f x)+a\right )^2}+\frac {b^4}{a^3 (a-b) \left (b \tan ^2(e+f x)+a\right )^3}+\frac {\cot ^3(e+f x)}{a^3}+\frac {(-a-3 b) \cot ^2(e+f x)}{a^4}+\frac {\left (a^2+3 b a+6 b^2\right ) \cot (e+f x)}{a^5}-\frac {1}{(a-b)^3 \left (\tan ^2(e+f x)+1\right )}\right )d\tan ^2(e+f x)}{2 f}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {-\frac {b^3 (4 a-3 b)}{a^4 (a-b)^2 \left (a+b \tan ^2(e+f x)\right )}+\frac {(a+3 b) \cot (e+f x)}{a^4}-\frac {b^3}{2 a^3 (a-b) \left (a+b \tan ^2(e+f x)\right )^2}-\frac {\cot ^2(e+f x)}{2 a^3}+\frac {\left (a^2+3 a b+6 b^2\right ) \log \left (\tan ^2(e+f x)\right )}{a^5}+\frac {b^3 \left (10 a^2-15 a b+6 b^2\right ) \log \left (a+b \tan ^2(e+f x)\right )}{a^5 (a-b)^3}-\frac {\log \left (\tan ^2(e+f x)+1\right )}{(a-b)^3}}{2 f}\)

input
Int[Cot[e + f*x]^5/(a + b*Tan[e + f*x]^2)^3,x]
 
output
(((a + 3*b)*Cot[e + f*x])/a^4 - Cot[e + f*x]^2/(2*a^3) + ((a^2 + 3*a*b + 6 
*b^2)*Log[Tan[e + f*x]^2])/a^5 - Log[1 + Tan[e + f*x]^2]/(a - b)^3 + (b^3* 
(10*a^2 - 15*a*b + 6*b^2)*Log[a + b*Tan[e + f*x]^2])/(a^5*(a - b)^3) - b^3 
/(2*a^3*(a - b)*(a + b*Tan[e + f*x]^2)^2) - ((4*a - 3*b)*b^3)/(a^4*(a - b) 
^2*(a + b*Tan[e + f*x]^2)))/(2*f)
 

3.3.42.3.1 Defintions of rubi rules used

rule 99
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_) 
)^(p_), x_] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*x)^n*(e + f*x)^p, x], 
 x] /; FreeQ[{a, b, c, d, e, f, p}, x] && IntegersQ[m, n] && (IntegerQ[p] | 
| (GtQ[m, 0] && GeQ[n, -1]))
 

rule 354
Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.)*((c_) + (d_.)*(x_)^2)^(q_.), x_S 
ymbol] :> Simp[1/2   Subst[Int[x^((m - 1)/2)*(a + b*x)^p*(c + d*x)^q, x], x 
, x^2], x] /; FreeQ[{a, b, c, d, p, q}, x] && NeQ[b*c - a*d, 0] && IntegerQ 
[(m - 1)/2]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4153
Int[((d_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*((c_.)*tan[(e_.) + 
(f_.)*(x_)])^(n_))^(p_.), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], 
 x]}, Simp[c*(ff/f)   Subst[Int[(d*ff*(x/c))^m*((a + b*(ff*x)^n)^p/(c^2 + f 
f^2*x^2)), x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ[{a, b, c, d, e, f, m, 
n, p}, x] && (IGtQ[p, 0] || EqQ[n, 2] || EqQ[n, 4] || (IntegerQ[p] && Ratio 
nalQ[n]))
 
3.3.42.4 Maple [A] (verified)

Time = 0.52 (sec) , antiderivative size = 199, normalized size of antiderivative = 0.95

method result size
derivativedivides \(\frac {-\frac {1}{4 a^{3} \tan \left (f x +e \right )^{4}}-\frac {-3 b -a}{2 a^{4} \tan \left (f x +e \right )^{2}}+\frac {\left (a^{2}+3 a b +6 b^{2}\right ) \ln \left (\tan \left (f x +e \right )\right )}{a^{5}}-\frac {\ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2 \left (a -b \right )^{3}}+\frac {b^{4} \left (-\frac {a \left (4 a^{2}-7 a b +3 b^{2}\right )}{b \left (a +b \tan \left (f x +e \right )^{2}\right )}+\frac {\left (10 a^{2}-15 a b +6 b^{2}\right ) \ln \left (a +b \tan \left (f x +e \right )^{2}\right )}{b}-\frac {a^{2} \left (a^{2}-2 a b +b^{2}\right )}{2 b \left (a +b \tan \left (f x +e \right )^{2}\right )^{2}}\right )}{2 a^{5} \left (a -b \right )^{3}}}{f}\) \(199\)
default \(\frac {-\frac {1}{4 a^{3} \tan \left (f x +e \right )^{4}}-\frac {-3 b -a}{2 a^{4} \tan \left (f x +e \right )^{2}}+\frac {\left (a^{2}+3 a b +6 b^{2}\right ) \ln \left (\tan \left (f x +e \right )\right )}{a^{5}}-\frac {\ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2 \left (a -b \right )^{3}}+\frac {b^{4} \left (-\frac {a \left (4 a^{2}-7 a b +3 b^{2}\right )}{b \left (a +b \tan \left (f x +e \right )^{2}\right )}+\frac {\left (10 a^{2}-15 a b +6 b^{2}\right ) \ln \left (a +b \tan \left (f x +e \right )^{2}\right )}{b}-\frac {a^{2} \left (a^{2}-2 a b +b^{2}\right )}{2 b \left (a +b \tan \left (f x +e \right )^{2}\right )^{2}}\right )}{2 a^{5} \left (a -b \right )^{3}}}{f}\) \(199\)
parallelrisch \(\frac {20 \left (a^{2}-\frac {3}{2} a b +\frac {3}{5} b^{2}\right ) b^{3} \left (a +b \tan \left (f x +e \right )^{2}\right )^{2} \ln \left (a +b \tan \left (f x +e \right )^{2}\right )-2 a^{5} \left (a +b \tan \left (f x +e \right )^{2}\right )^{2} \ln \left (\sec \left (f x +e \right )^{2}\right )-\left (-4 \left (a^{2}+3 a b +6 b^{2}\right ) \left (a -b \right )^{2} \left (a +b \tan \left (f x +e \right )^{2}\right )^{2} \ln \left (\tan \left (f x +e \right )\right )+\left (4 a^{3} b^{3}+3 a^{2} b^{4}-27 a \,b^{5}+18 b^{6}\right ) \tan \left (f x +e \right )^{4}+\left (6 a^{4} b^{2}+4 a^{3} b^{3}-36 a^{2} b^{4}+24 a \,b^{5}\right ) \tan \left (f x +e \right )^{2}+a^{3} \cot \left (f x +e \right )^{2} \left (a -b \right )^{2} \left (\cot \left (f x +e \right )^{2} a -2 a -4 b \right )\right ) \left (a -b \right )}{4 \left (a -b \right )^{3} a^{5} f \left (a +b \tan \left (f x +e \right )^{2}\right )^{2}}\) \(268\)
norman \(\frac {-\frac {1}{4 a f}+\frac {\left (a +2 b \right ) \tan \left (f x +e \right )^{2}}{2 a^{2} f}+\frac {\left (-4 a^{3} b -3 a^{2} b^{2}+27 a \,b^{3}-18 b^{4}\right ) b^{2} \tan \left (f x +e \right )^{8}}{4 f \,a^{5} \left (a^{2}-2 a b +b^{2}\right )}+\frac {\left (-3 a^{3} b -2 a^{2} b^{2}+18 a \,b^{3}-12 b^{4}\right ) b \tan \left (f x +e \right )^{6}}{2 a^{4} f \left (a^{2}-2 a b +b^{2}\right )}}{\tan \left (f x +e \right )^{4} \left (a +b \tan \left (f x +e \right )^{2}\right )^{2}}+\frac {\left (a^{2}+3 a b +6 b^{2}\right ) \ln \left (\tan \left (f x +e \right )\right )}{a^{5} f}-\frac {\ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2 f \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right )}+\frac {b^{3} \left (10 a^{2}-15 a b +6 b^{2}\right ) \ln \left (a +b \tan \left (f x +e \right )^{2}\right )}{2 a^{5} f \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right )}\) \(297\)
risch \(\text {Expression too large to display}\) \(1384\)

input
int(cot(f*x+e)^5/(a+b*tan(f*x+e)^2)^3,x,method=_RETURNVERBOSE)
 
output
1/f*(-1/4/a^3/tan(f*x+e)^4-1/2*(-3*b-a)/a^4/tan(f*x+e)^2+(a^2+3*a*b+6*b^2) 
/a^5*ln(tan(f*x+e))-1/2/(a-b)^3*ln(1+tan(f*x+e)^2)+1/2*b^4/a^5/(a-b)^3*(-a 
*(4*a^2-7*a*b+3*b^2)/b/(a+b*tan(f*x+e)^2)+(10*a^2-15*a*b+6*b^2)/b*ln(a+b*t 
an(f*x+e)^2)-1/2*a^2*(a^2-2*a*b+b^2)/b/(a+b*tan(f*x+e)^2)^2))
 
3.3.42.5 Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 611 vs. \(2 (200) = 400\).

Time = 0.37 (sec) , antiderivative size = 611, normalized size of antiderivative = 2.91 \[ \int \frac {\cot ^5(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx=\frac {3 \, {\left (a^{5} b^{2} - a^{4} b^{3} - 3 \, a^{3} b^{4} + 8 \, a^{2} b^{5} - 4 \, a b^{6}\right )} \tan \left (f x + e\right )^{8} - a^{7} + 3 \, a^{6} b - 3 \, a^{5} b^{2} + a^{4} b^{3} + 2 \, {\left (3 \, a^{6} b - 2 \, a^{5} b^{2} - 9 \, a^{4} b^{3} + 14 \, a^{3} b^{4} + 3 \, a^{2} b^{5} - 6 \, a b^{6}\right )} \tan \left (f x + e\right )^{6} + {\left (3 \, a^{7} + a^{6} b - 10 \, a^{5} b^{2} - 6 \, a^{4} b^{3} + 33 \, a^{3} b^{4} - 18 \, a^{2} b^{5}\right )} \tan \left (f x + e\right )^{4} + 2 \, {\left (a^{7} - a^{6} b - 3 \, a^{5} b^{2} + 5 \, a^{4} b^{3} - 2 \, a^{3} b^{4}\right )} \tan \left (f x + e\right )^{2} + 2 \, {\left ({\left (a^{5} b^{2} - 10 \, a^{2} b^{5} + 15 \, a b^{6} - 6 \, b^{7}\right )} \tan \left (f x + e\right )^{8} + 2 \, {\left (a^{6} b - 10 \, a^{3} b^{4} + 15 \, a^{2} b^{5} - 6 \, a b^{6}\right )} \tan \left (f x + e\right )^{6} + {\left (a^{7} - 10 \, a^{4} b^{3} + 15 \, a^{3} b^{4} - 6 \, a^{2} b^{5}\right )} \tan \left (f x + e\right )^{4}\right )} \log \left (\frac {\tan \left (f x + e\right )^{2}}{\tan \left (f x + e\right )^{2} + 1}\right ) + 2 \, {\left ({\left (10 \, a^{2} b^{5} - 15 \, a b^{6} + 6 \, b^{7}\right )} \tan \left (f x + e\right )^{8} + 2 \, {\left (10 \, a^{3} b^{4} - 15 \, a^{2} b^{5} + 6 \, a b^{6}\right )} \tan \left (f x + e\right )^{6} + {\left (10 \, a^{4} b^{3} - 15 \, a^{3} b^{4} + 6 \, a^{2} b^{5}\right )} \tan \left (f x + e\right )^{4}\right )} \log \left (\frac {b \tan \left (f x + e\right )^{2} + a}{\tan \left (f x + e\right )^{2} + 1}\right )}{4 \, {\left ({\left (a^{8} b^{2} - 3 \, a^{7} b^{3} + 3 \, a^{6} b^{4} - a^{5} b^{5}\right )} f \tan \left (f x + e\right )^{8} + 2 \, {\left (a^{9} b - 3 \, a^{8} b^{2} + 3 \, a^{7} b^{3} - a^{6} b^{4}\right )} f \tan \left (f x + e\right )^{6} + {\left (a^{10} - 3 \, a^{9} b + 3 \, a^{8} b^{2} - a^{7} b^{3}\right )} f \tan \left (f x + e\right )^{4}\right )}} \]

input
integrate(cot(f*x+e)^5/(a+b*tan(f*x+e)^2)^3,x, algorithm="fricas")
 
output
1/4*(3*(a^5*b^2 - a^4*b^3 - 3*a^3*b^4 + 8*a^2*b^5 - 4*a*b^6)*tan(f*x + e)^ 
8 - a^7 + 3*a^6*b - 3*a^5*b^2 + a^4*b^3 + 2*(3*a^6*b - 2*a^5*b^2 - 9*a^4*b 
^3 + 14*a^3*b^4 + 3*a^2*b^5 - 6*a*b^6)*tan(f*x + e)^6 + (3*a^7 + a^6*b - 1 
0*a^5*b^2 - 6*a^4*b^3 + 33*a^3*b^4 - 18*a^2*b^5)*tan(f*x + e)^4 + 2*(a^7 - 
 a^6*b - 3*a^5*b^2 + 5*a^4*b^3 - 2*a^3*b^4)*tan(f*x + e)^2 + 2*((a^5*b^2 - 
 10*a^2*b^5 + 15*a*b^6 - 6*b^7)*tan(f*x + e)^8 + 2*(a^6*b - 10*a^3*b^4 + 1 
5*a^2*b^5 - 6*a*b^6)*tan(f*x + e)^6 + (a^7 - 10*a^4*b^3 + 15*a^3*b^4 - 6*a 
^2*b^5)*tan(f*x + e)^4)*log(tan(f*x + e)^2/(tan(f*x + e)^2 + 1)) + 2*((10* 
a^2*b^5 - 15*a*b^6 + 6*b^7)*tan(f*x + e)^8 + 2*(10*a^3*b^4 - 15*a^2*b^5 + 
6*a*b^6)*tan(f*x + e)^6 + (10*a^4*b^3 - 15*a^3*b^4 + 6*a^2*b^5)*tan(f*x + 
e)^4)*log((b*tan(f*x + e)^2 + a)/(tan(f*x + e)^2 + 1)))/((a^8*b^2 - 3*a^7* 
b^3 + 3*a^6*b^4 - a^5*b^5)*f*tan(f*x + e)^8 + 2*(a^9*b - 3*a^8*b^2 + 3*a^7 
*b^3 - a^6*b^4)*f*tan(f*x + e)^6 + (a^10 - 3*a^9*b + 3*a^8*b^2 - a^7*b^3)* 
f*tan(f*x + e)^4)
 
3.3.42.6 Sympy [F(-1)]

Timed out. \[ \int \frac {\cot ^5(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx=\text {Timed out} \]

input
integrate(cot(f*x+e)**5/(a+b*tan(f*x+e)**2)**3,x)
 
output
Timed out
 
3.3.42.7 Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 416 vs. \(2 (200) = 400\).

Time = 0.24 (sec) , antiderivative size = 416, normalized size of antiderivative = 1.98 \[ \int \frac {\cot ^5(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx=\frac {\frac {2 \, {\left (10 \, a^{2} b^{3} - 15 \, a b^{4} + 6 \, b^{5}\right )} \log \left (-{\left (a - b\right )} \sin \left (f x + e\right )^{2} + a\right )}{a^{8} - 3 \, a^{7} b + 3 \, a^{6} b^{2} - a^{5} b^{3}} + \frac {2 \, {\left (2 \, a^{6} - 7 \, a^{5} b + 5 \, a^{4} b^{2} + 10 \, a^{3} b^{3} - 25 \, a^{2} b^{4} + 21 \, a b^{5} - 6 \, b^{6}\right )} \sin \left (f x + e\right )^{6} - a^{6} + 3 \, a^{5} b - 3 \, a^{4} b^{2} + a^{3} b^{3} - {\left (9 \, a^{6} - 25 \, a^{5} b + 10 \, a^{4} b^{2} + 30 \, a^{3} b^{3} - 45 \, a^{2} b^{4} + 18 \, a b^{5}\right )} \sin \left (f x + e\right )^{4} + 2 \, {\left (3 \, a^{6} - 7 \, a^{5} b + 3 \, a^{4} b^{2} + 3 \, a^{3} b^{3} - 2 \, a^{2} b^{4}\right )} \sin \left (f x + e\right )^{2}}{{\left (a^{9} - 5 \, a^{8} b + 10 \, a^{7} b^{2} - 10 \, a^{6} b^{3} + 5 \, a^{5} b^{4} - a^{4} b^{5}\right )} \sin \left (f x + e\right )^{8} - 2 \, {\left (a^{9} - 4 \, a^{8} b + 6 \, a^{7} b^{2} - 4 \, a^{6} b^{3} + a^{5} b^{4}\right )} \sin \left (f x + e\right )^{6} + {\left (a^{9} - 3 \, a^{8} b + 3 \, a^{7} b^{2} - a^{6} b^{3}\right )} \sin \left (f x + e\right )^{4}} + \frac {2 \, {\left (a^{2} + 3 \, a b + 6 \, b^{2}\right )} \log \left (\sin \left (f x + e\right )^{2}\right )}{a^{5}}}{4 \, f} \]

input
integrate(cot(f*x+e)^5/(a+b*tan(f*x+e)^2)^3,x, algorithm="maxima")
 
output
1/4*(2*(10*a^2*b^3 - 15*a*b^4 + 6*b^5)*log(-(a - b)*sin(f*x + e)^2 + a)/(a 
^8 - 3*a^7*b + 3*a^6*b^2 - a^5*b^3) + (2*(2*a^6 - 7*a^5*b + 5*a^4*b^2 + 10 
*a^3*b^3 - 25*a^2*b^4 + 21*a*b^5 - 6*b^6)*sin(f*x + e)^6 - a^6 + 3*a^5*b - 
 3*a^4*b^2 + a^3*b^3 - (9*a^6 - 25*a^5*b + 10*a^4*b^2 + 30*a^3*b^3 - 45*a^ 
2*b^4 + 18*a*b^5)*sin(f*x + e)^4 + 2*(3*a^6 - 7*a^5*b + 3*a^4*b^2 + 3*a^3* 
b^3 - 2*a^2*b^4)*sin(f*x + e)^2)/((a^9 - 5*a^8*b + 10*a^7*b^2 - 10*a^6*b^3 
 + 5*a^5*b^4 - a^4*b^5)*sin(f*x + e)^8 - 2*(a^9 - 4*a^8*b + 6*a^7*b^2 - 4* 
a^6*b^3 + a^5*b^4)*sin(f*x + e)^6 + (a^9 - 3*a^8*b + 3*a^7*b^2 - a^6*b^3)* 
sin(f*x + e)^4) + 2*(a^2 + 3*a*b + 6*b^2)*log(sin(f*x + e)^2)/a^5)/f
 
3.3.42.8 Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1401 vs. \(2 (200) = 400\).

Time = 1.27 (sec) , antiderivative size = 1401, normalized size of antiderivative = 6.67 \[ \int \frac {\cot ^5(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx=\text {Too large to display} \]

input
integrate(cot(f*x+e)^5/(a+b*tan(f*x+e)^2)^3,x, algorithm="giac")
 
output
1/64*(32*(10*a^2*b^3 - 15*a*b^4 + 6*b^5)*log(a + 2*a*(cos(f*x + e) - 1)/(c 
os(f*x + e) + 1) - 4*b*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) + a*(cos(f*x 
+ e) - 1)^2/(cos(f*x + e) + 1)^2)/(a^8 - 3*a^7*b + 3*a^6*b^2 - a^5*b^3) - 
64*log(abs(-(cos(f*x + e) - 1)/(cos(f*x + e) + 1) + 1))/(a^3 - 3*a^2*b + 3 
*a*b^2 - b^3) - (a^7 - 3*a^6*b + 3*a^5*b^2 - a^4*b^3 + 16*a^7*(cos(f*x + e 
) - 1)/(cos(f*x + e) + 1) - 32*a^6*b*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) 
 + 32*a^4*b^3*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) - 16*a^3*b^4*(cos(f*x 
+ e) - 1)/(cos(f*x + e) + 1) + 70*a^7*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 
 1)^2 - 178*a^6*b*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2 + 34*a^5*b^2*( 
cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2 + 586*a^4*b^3*(cos(f*x + e) - 1)^ 
2/(cos(f*x + e) + 1)^2 - 752*a^3*b^4*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 
1)^2 + 272*a^2*b^5*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2 + 140*a^7*(co 
s(f*x + e) - 1)^3/(cos(f*x + e) + 1)^3 - 412*a^6*b*(cos(f*x + e) - 1)^3/(c 
os(f*x + e) + 1)^3 + 204*a^5*b^2*(cos(f*x + e) - 1)^3/(cos(f*x + e) + 1)^3 
 + 1356*a^4*b^3*(cos(f*x + e) - 1)^3/(cos(f*x + e) + 1)^3 - 3272*a^3*b^4*( 
cos(f*x + e) - 1)^3/(cos(f*x + e) + 1)^3 + 2496*a^2*b^5*(cos(f*x + e) - 1) 
^3/(cos(f*x + e) + 1)^3 - 640*a*b^6*(cos(f*x + e) - 1)^3/(cos(f*x + e) + 1 
)^3 + 145*a^7*(cos(f*x + e) - 1)^4/(cos(f*x + e) + 1)^4 - 403*a^6*b*(cos(f 
*x + e) - 1)^4/(cos(f*x + e) + 1)^4 + 211*a^5*b^2*(cos(f*x + e) - 1)^4/(co 
s(f*x + e) + 1)^4 + 1487*a^4*b^3*(cos(f*x + e) - 1)^4/(cos(f*x + e) + 1...
 
3.3.42.9 Mupad [B] (verification not implemented)

Time = 12.73 (sec) , antiderivative size = 269, normalized size of antiderivative = 1.28 \[ \int \frac {\cot ^5(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx=\frac {\frac {{\mathrm {tan}\left (e+f\,x\right )}^2\,\left (a+2\,b\right )}{2\,a^2}-\frac {1}{4\,a}+\frac {{\mathrm {tan}\left (e+f\,x\right )}^6\,\left (a^3\,b^2+a^2\,b^3-9\,a\,b^4+6\,b^5\right )}{2\,a^4\,\left (a^2-2\,a\,b+b^2\right )}+\frac {{\mathrm {tan}\left (e+f\,x\right )}^4\,\left (4\,a^3\,b+3\,a^2\,b^2-27\,a\,b^3+18\,b^4\right )}{4\,a^3\,\left (a^2-2\,a\,b+b^2\right )}}{f\,\left (a^2\,{\mathrm {tan}\left (e+f\,x\right )}^4+2\,a\,b\,{\mathrm {tan}\left (e+f\,x\right )}^6+b^2\,{\mathrm {tan}\left (e+f\,x\right )}^8\right )}-\frac {\ln \left (b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a\right )\,\left (\frac {3\,b}{2\,a^4}+\frac {1}{2\,a^3}-\frac {1}{2\,{\left (a-b\right )}^3}+\frac {3\,b^2}{a^5}\right )}{f}-\frac {\ln \left ({\mathrm {tan}\left (e+f\,x\right )}^2+1\right )}{2\,f\,{\left (a-b\right )}^3}+\frac {\ln \left (\mathrm {tan}\left (e+f\,x\right )\right )\,\left (a^2+3\,a\,b+6\,b^2\right )}{a^5\,f} \]

input
int(cot(e + f*x)^5/(a + b*tan(e + f*x)^2)^3,x)
 
output
((tan(e + f*x)^2*(a + 2*b))/(2*a^2) - 1/(4*a) + (tan(e + f*x)^6*(6*b^5 - 9 
*a*b^4 + a^2*b^3 + a^3*b^2))/(2*a^4*(a^2 - 2*a*b + b^2)) + (tan(e + f*x)^4 
*(4*a^3*b - 27*a*b^3 + 18*b^4 + 3*a^2*b^2))/(4*a^3*(a^2 - 2*a*b + b^2)))/( 
f*(a^2*tan(e + f*x)^4 + b^2*tan(e + f*x)^8 + 2*a*b*tan(e + f*x)^6)) - (log 
(a + b*tan(e + f*x)^2)*((3*b)/(2*a^4) + 1/(2*a^3) - 1/(2*(a - b)^3) + (3*b 
^2)/a^5))/f - log(tan(e + f*x)^2 + 1)/(2*f*(a - b)^3) + (log(tan(e + f*x)) 
*(3*a*b + a^2 + 6*b^2))/(a^5*f)